package com.ruoyi.system.service.impl;


import com.ruoyi.system.domain.LabProjectInstrument;
import com.ruoyi.system.mapper.LabProjectInstrumentMapper;
import com.ruoyi.system.service.ILabProjectInstrumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目创建实验仪器Service业务层处理
 *
 * @author jun.wang
 * @date 2022-04-12
 */
@Service
public class LabProjectInstrumentServiceImpl implements ILabProjectInstrumentService {
    @Autowired
    private LabProjectInstrumentMapper labProjectInstrumentMapper;

    /**
     * 查询项目创建实验仪器
     *
     * @param instanceId 项目创建实验仪器ID
     * @return 项目创建实验仪器
     */
    @Override
    public LabProjectInstrument selectLabProjectInstrumentById(Long instanceId) {
        return labProjectInstrumentMapper.selectLabProjectInstrumentById(instanceId);
    }

    /**
     * 查询项目创建实验仪器列表
     *
     * @param labProjectInstrument 项目创建实验仪器
     * @return 项目创建实验仪器
     */
    @Override
    public List<LabProjectInstrument> selectLabProjectInstrumentList(LabProjectInstrument labProjectInstrument) {
        return labProjectInstrumentMapper.selectLabProjectInstrumentList(labProjectInstrument);
    }

    /**
     * 新增项目创建实验仪器
     *
     * @param labProjectInstrument 项目创建实验仪器
     * @return 结果
     */
    @Override
    public int insertLabProjectInstrument(LabProjectInstrument labProjectInstrument) {
        return labProjectInstrumentMapper.insertLabProjectInstrument(labProjectInstrument);
    }

    /**
     * 修改项目创建实验仪器
     *
     * @param labProjectInstrument 项目创建实验仪器
     * @return 结果
     */
    @Override
    public int updateLabProjectInstrument(LabProjectInstrument labProjectInstrument) {
        return labProjectInstrumentMapper.updateLabProjectInstrument(labProjectInstrument);
    }

    /**
     * 批量删除项目创建实验仪器
     *
     * @param instanceIds 需要删除的项目创建实验仪器ID
     * @return 结果
     */
    @Override
    public int deleteLabProjectInstrumentByIds(Long[] instanceIds) {
        return labProjectInstrumentMapper.deleteLabProjectInstrumentByIds(instanceIds);
    }

    /**
     * 删除项目创建实验仪器信息
     *
     * @param instanceId 项目创建实验仪器ID
     * @return 结果
     */
    @Override
    public int deleteLabProjectInstrumentById(Long instanceId) {
        return labProjectInstrumentMapper.deleteLabProjectInstrumentById(instanceId);
    }
}
